From: Adel Gadllah Date: Mon, 28 Feb 2011 21:34:19 +0000 (+0100) Subject: dnd: Don't pass null to ClutterActor.disconnect() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8837 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7c534a87cfe8aeee220d068115a51c5281f3f5af;p=gnome-shell.git dnd: Don't pass null to ClutterActor.disconnect() _ungrabActor disconnects the event signal handler but does not check whether it is connected before doing so which can result into an exception like: JS ERROR: !!! Exception was: Error: disconnect() takes one arg, the signal handler id JS ERROR: !!! lineNumber = '0' JS ERROR: !!! fileName = 'gjs_throw' JS ERROR: !!! stack = 'Error("disconnect() takes one arg, the signal handler id")@:0 --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 021cb2eb3..61776da91 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -144,6 +144,8 @@ _Draggable.prototype = { _ungrabActor: function() { Clutter.ungrab_pointer(); + if (!this._onEventId) + return; this.actor.disconnect(this._onEventId); this._onEventId = null; },